<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>setup与渲染函数一起使用</title>
</head>

<body>
    <div id="app">

    </div>
</body>
<script src="./js/vue.global.js"></script>
<script>

    const { createApp, ref, onMounted, h, reactive } = Vue


    const app = createApp({
        setup() {

            let countRef = ref(5);

            let sourceArr = [countRef];

            let countProxy = reactive(sourceArr);//给reactive()传入的是数组，不会解包。

            console.log("countProxy[0].value", countProxy[0].value);//因为，不会解包，所以，需要 .value;




            return {

            }
        }
    })



    app.mount('#app')
</script>

</html>